﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<MedicalManagementSystem.Models.Diagnos>" 
MasterPageFile="~/Views/Shared/AdminSite.master" %>
<%@ Import Namespace="MedicalManagementSystem.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= String.Format("Диагноз: {0}", Model.Name) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainRightColumn" runat="server">

    <h2><%= String.Format("Редактирование диагноза: {0}", Model.Name) %></h2>
    
    <%= Html.ValidationSummary("Пожалуйста, исправьте ошибки и попробуйте снова.") %>

    <% using (Html.BeginForm()) {%>
        
        <fieldset>
            
            <div class="editor-label">
                <%= Html.Label("Шифр по МКБ-10") %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MKB) %>
                <%= Html.ValidationMessage("MKB", "*") %>
            </div>
            
            <div class="editor-label">
                <%= Html.Label("Название") %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Name) %>
                <%= Html.ValidationMessage("Name", "*") %>
            </div>
            
            <div class="editor-label">
                <%= Html.Label("Описание") %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Description) %>
                <%= Html.ValidationMessageFor(model => model.Description) %>
            </div>
            
            <p>
                <label for="DiagnosBloc">Область:</label>
                <%= Html.DropDownList("DiagnosBlocId",
                    new SelectList(DbContext.Instance.DiagnosBloc, "id", "Name", Model.DiagnosBloc != null ? Model.DiagnosBloc.id : -12345))%>
            </p>
            
            <p>
                <input type="submit" value="Сохранить" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Назад к списку", "Index") %>
    </div>

</asp:Content>

